#pragma once

#include <atomic>

namespace frame {
namespace imp {

class UniqueNumber{
public:
    UniqueNumber()
    :number(0)
    {
    }
    ~UniqueNumber(){};

    uint64_t current() const {
        return number.load();
    }
    uint64_t next(){
        return number.fetch_add(1);
    }
private:
    std::atomic<uint64_t> number;
};


} //end of namespace imp
} //end of namespace  frame
